package com.ocean.common.utils.swf;

import com.ocean.common.utils.file.FileUploadUtils;
import com.ocean.common.utils.file.FileUtils;

public class SwfToolsUtil {
	public static void convert2SWF(String inputFile) {

		String extend= FileUtils.getExtend(inputFile,"");
		PDFConverter pdfConverter = new OpenOfficePDFConverter();
		SWFConverter swfConverter = new SWFToolsSWFConverter();
		if(extend.equals("pdf"))
		{
			swfConverter.convert2SWF(inputFile,extend);
                }
		if(extend.equals("doc")||extend.equals("docx")||extend.equals("xls")||extend.equals("pptx")||extend.equals("xlsx")||extend.equals("ppt")||extend.equals("txt")||extend.equals("odt"))
		{
			DocConverter converter = new DocConverter(pdfConverter,swfConverter);
			converter.convert(inputFile,extend);
            }

    }
}
